package com.design.patterns.interceptingFilter;

/**
 * 创建过滤管理器。
 * @Author: jinxuan
 * @Date: 2021/3/3 14:25
 */
public class FilterManager {
    FilterChain filterChain;

    public FilterManager(Target target){
        filterChain = new FilterChain();
        filterChain.setTarget(target);
    }
    public void setFilter(Filter filter){
        filterChain.addFilter(filter);
    }

    public void filterRequest(String request){
        filterChain.execute(request);
    }
}
